-- GENERATED SPELL FOR [Grand Apothecary Putress] --


function spell0_31530(pUnit, Event) --@Blight Overload,Self--
pUnit:FullCastSpellOnTarget(61181,pUnit)
pUnit:RegisterEvent('Sorts_31530', 611, 1)
end

function spell1_31530(pUnit, Event) --@Throw Blight Barrel,n/a--
pUnit:FullCastSpellOnTarget(59460,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31530', 7500, 1)
end

function spell2_31530(pUnit, Event) --@Unholy Frenzy,n/a--
pUnit:FullCastSpellOnTarget(60300,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31530', 20273, 1)
end

function Sorts_31530(pUnit, Event)
local choix_sorts_31530 = math.random(0, 2)
if choix_sorts_31530 == 0 then
pUnit:RegisterEvent('spell0_31530', 1, 1)
end
if choix_sorts_31530 == 1 then
pUnit:RegisterEvent('spell1_31530', 1, 1)
end
if choix_sorts_31530 == 2 then
pUnit:RegisterEvent('spell2_31530', 1, 1)
end
end

function mob31530_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31530', math.random(1500, 3000), 1)
end

function mob31530_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31530_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31530_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31530, 1, 'mob31530_Action')
RegisterUnitEvent(31530, 2, 'mob31530_Leave')
RegisterUnitEvent(31530, 3, 'mob31530_Kill')
RegisterUnitEvent(31530, 4, 'mob31530_Die')
